<template>
<el-menu
        active-text-color="#ffd04b"
        :style="{width:!isCollapse?'230px':'64px'}"
        background-color="#545c64"
        class="aside-container"
        text-color="#fff"
        :collapse="isCollapse"
        @open="handleOpen"
        @close="handleClose"
        :default-active="active"
      >
      <p class="logo-lg">{{ isCollapse? 'DIDI':'DIDI陪诊' }}</p>
      <treeMenu :menuData="menuData" :index="1"/>
      </el-menu>
</template>
<script setup>
import treeMenu from './treeMenu.vue'
import { useRouter } from 'vue-router'
import { reactive,computed } from 'vue'
import { useStore } from 'vuex'
// 拿到store实例
const store=useStore()
// 定义计算属性
const isCollapse=computed(()=>store.state.menu.isCollapse)

const router = useRouter()
const menuData=computed(() => store.state.menu.routerList)

const active=computed(()=>store.state.menu.menuActive)


console.log(router)
const handleOpen=()=>{}
const handleClose=()=>{}
</script>
<style scoped lang="less">
.aside-container{
  height: 100%;
  .logo-lg{
    height: 50px;
    line-height: 50px;
    font-size: 20px;
    color: #fff;
    text-align: center;
  }
}
</style>